const http = require('http');

const port = 8080;

const server = http.createServer((request, response) => {
    // 处理请求逻辑
    response.statusCode = 200;
    response.setHeader('Content-Type', 'text/plain');
    response.end('Hello, World!');
});

server.listen(port, () => {
    console.log(`Server running on port ${port}`);
});
